import { create } from 'zustand'
import api from '../api'
import fetch from '../fetch'

const useStore = create((set) => ({
  info: null,
  async fetchInfo() {
    const data = await fetch({
      url: api.info,
    })

    set({ info: data })
  },
}))

export default useStore
